using System;
using System.Collections;
using System.Collections.Generic;

namespace Decision_Tree
{
	/* Example - stores one example of the decision */
	public class Example
	{
		Dictionary<Attribute, bool> values = new Dictionary<Attribute, bool>();
		public Actions action;

		public Example(bool bCloseToGoal, bool bCloseToFood, bool bCloseToHerder, bool bTimeLeft, bool bHasFood, Actions anAction)
		{
			action = anAction;
			values.Add(Attribute.bCloseToGoal, bCloseToGoal);
			values.Add(Attribute.bCloseToFood, bCloseToFood);
			values.Add(Attribute.bCloseToHerder, bCloseToHerder);
			values.Add(Attribute.bTimeLeft, bTimeLeft);
			values.Add(Attribute.bHasFood, bHasFood);			
		}
		
		public bool getValue(Attribute attribute)
		{
			return values[attribute];
		}
		
		public void printExample()
		{
			Console.WriteLine(
				values[Attribute.bCloseToFood]+" "
				+values[Attribute.bCloseToGoal]+" "
				+values[Attribute.bCloseToHerder]+" "
				+values[Attribute.bHasFood]+" "
				+values[Attribute.bTimeLeft]);
		}
	}
}

